﻿@using ProjectThuCung.Models;
@{
    
    foreach(var data in (List<SanPham>)ViewBag.data)
    {
        ViewBag.Title = data.TenSanPham;
        <div id ="left">
        <div class="innner-block-parent">
              <div class="inner-img-detail zoom-thumb-detail">
                  <div id="wrap" style="z-index:999;position:relative;">
                      <a href = "@data.HinhAnh" style="position: relative; display: block; ">
                          <img src= "@data.HinhAnh" class="img-detail-popup img-detail" style="display: block; ">
                      </a>
                  </div>
              </div>
        </div>
        <div class="detail-text">
                <h2 style="color:#f6350a">@data.TenSanPham - @data.SanPhamID</h2>
            <div style="margin-bottom:5px;height:25px;">
              <div style="float:left;width:55px;"><a class="addthis_button_pinterest at300b" title="Pinterest" href="#"><span class="at_PinItButton"></span></a></div>
              <div class="g-plusone" data-annotation="none"></div>
            </div>
            <!-- description arrow -->
            <div class="font-normal" style="margin-bottom:10px; border-bottom:1px solid #eee; padding-bottom:10px; padding-top:10px; border-top:1px solid #eee"> <span class="detail_text_short_description">
              @Html.Raw(System.Web.HttpUtility.HtmlDecode(data.MoTa)) </span>
               <div id="short_promotion"></div>       
            </div>
             <!-- //description arrow -->    
            <!-- 1 arrow -->
            <div style="margin-bottom:5px;">
              <div class="col_1detail font-medium">
                <div class="col_1left-detail">Giá bán:</div>
              </div>
              <div class="font-medium">
                <div class="col_1right-detail detail-product product_price"><span>
                            <input type="hidden" id="chkprice" value="219000">
                  <span class="font-bigger color-red">@data.Gia.000</span>&nbsp;<b style="color: #AC0404;text-decoration: underline;font-size:14px;font-weight: bold;">đ</b>
                            </span></div>        
              </div>
            </div>
                    <div style="margin-bottom:5px">
              <div class="col_1detail font-medium">
                <div class="col_1left-detail">Mã sản phẩm:</div>
              </div>
              <div class="font-medium">
                <div class="col_1right-detail"><span class="product_model">@data.SanPhamID</span></div>
              </div>
            </div>
              <div style="margin-bottom:5px;">
              <div class="col_1detail font-medium">
                <div class="col_1left-detail">
                  Xuất xứ:        </div>
              </div>
              <div class="font-medium">
                <div class="col_1right-detail">@data.XuatXu.TenXuatXu</div>
              </div>
            </div>
               <div style="margin-bottom:5px">
              <div class="col_1detail font-medium">
                <div class="col_1left-detail">Loại sản phẩm:</div>
              </div>
              <div class="font-medium">
                <div class="col_1right-detail">
                  @data.LoaiSanPham.TenLoaiSanPham        </div>
              </div>
            </div>
                        
@*            <div style="margin-bottom:5px" class="order_size_choose">
                  <div class="col_1detail font-medium">
                    <div class="col_1left-detail">Kích thước</div>
                  </div>
                  <div class="font-medium">
                    <div class="col_1right-detail">
                      <ul class="choose-color col2">              	            
                	               
					        <select id="attr_size" class="select-col2 size_order_select"> 
                    	        <option value=""></option>
                            <option value="16496">S</option><option value="16497">M</option><option value="16498">L</option></select>                                          
                    	                                      
				        		       
                      </ul>
                    </div>
                  </div>
                </div>*@

        		
@*        <input type="hidden" id="choose_product_id" value="">
        <input type="hidden" name="isquantity" id="isquantity" value="1">
        <div style="margin-bottom:5px">
          <div class="col_1detail font-medium">
            <div class="col_1left-detail">Số lượng</div>
          </div>
          <div class="font-medium">
            <div class="col_1right-detail">
      	        <select name="quantity_de" id="quantity_de" class="select-col2 qty_order_select"></select>
    	        <div class="qty_order_select_none" style="display:none;color:#F00;">Hiện tại sản phẩm đã hết hàng</div>
            </div>
          </div>
        </div>
                <div style="position:relative;margin-bottom:15px;">
              <div id="showtip" style="width:300px; margin-top:8px;">
                <div id="sizeSelectInfo" class="prd-tooltip" style="z-index: 1001; position: absolute; top: -15px; left: -55px; display: none; opacity: 0.9; "><span class="msg">Xin vui lòng chọn kích thước để tiếp tục</span> </div>
              </div>
              <p style="margin:30px 0 5px 119px"><a class="cart123-them" style="margin-top:10px; font-size: 16px; font-weight: bold; padding: 13px;" rel="tooltip" href="javascript:void(0);" onclick="addCard(16495, 1, '');">Thêm vào giỏ hàng</a></p>
            </div>
            <div class="c1"></div>*@
            <p style="margin:30px 0 5px 119px"><a class="cart123-them" style="margin-top:10px; font-size: 16px; font-weight: bold; padding: 13px;" rel="tooltip" href="javascript:void(0);" onclick="addCard(16495, 1, '');">Thêm vào giỏ hàng</a></p>
          </div>
    </div>
    if(data.LoaiSanPham.SubLoaiSanPham == SubLoaiSP.ThuCung)
    {
        <div class="wrapper" style="margin-bottom:20px">
          <ul class="tab-detail">
            <li><a href="javascript:void(0);" title="info" class="selected tab">Thông tin chi tiết</a></li>
                  </ul>
          <div style="margin-bottom:5px">
                      <div class="col_1detail font-medium">
                        <div class="col_1left-detail">Giống:</div>
                      </div>
                      <div class="font-medium">
                        <div class="col_1right-detail">
                          @data.ThongTinThem.Giong        </div>
                      </div>
                    </div>
            <div style="margin-bottom:5px">
                      <div class="col_1detail font-medium">
                        <div class="col_1left-detail">Giới tính:</div>
                      </div>
                @{
                    if(data.ThongTinThem.GioiTinh == true)
                    {
                          <div class="font-medium">
                            <div class="col_1right-detail">
                              Đực        </div>
                          </div>
                    }
                    else
                    {
                        <div class="font-medium">
                            <div class="col_1right-detail">
                              Cái        </div>
                          </div>
                    }
                }
                    </div>
            <div style="margin-bottom:5px">
                      <div class="col_1detail font-medium">
                        <div class="col_1left-detail">Tuổi:</div>
                      </div>
                      <div class="font-medium">
                        <div class="col_1right-detail">
                          @data.ThongTinThem.ThangTuoi tháng tuổi        </div>
                      </div>
                    </div>
            <div style="margin-bottom:5px">
                      <div class="col_1detail font-medium">
                        <div class="col_1left-detail">Màu:</div>
                      </div>
                      <div class="font-medium">
                        <div class="col_1right-detail">
                          @data.ThongTinThem.Mau        </div>
                      </div>
                    </div>
            <div style="margin-bottom:5px">
                      <div class="col_1detail font-medium">
                        <div class="col_1left-detail">Trọng lượng:</div>
                      </div>
                      <div class="font-medium">
                        <div class="col_1right-detail">
                          @data.ThongTinThem.TrongLuong kg       </div>
                      </div>
                    </div>
        </div>
    }
    <div class="col_2layout">
    @if(ViewBag.quantam !=null)
    {
        <h3 style="font-weight: bold;">Có thể bạn quan tâm</h3>
        <div class="wrapper" style="margin-bottom:10px">
        @foreach (var item in (List<SanPham>)ViewBag.quantam)
        {
            <div class="products product_item" style="margin-left:10px;height:300px;">
                <div class="inner-product-home">
                    <a href="/SanPham/ThongTinSanPham?sanpham=@item.TenSanPham&id=@item.SanPhamID">
                        <img width="171" height="214" class="lazy img-product" src="@item.HinhAnh" alt="" data-original="@item.HinhAnh" style="display: block; "></a> 
                </div> 
                <div class="infor-text-pro">                    
                        @{
                            if(item.TenSanPham.Count() <=30)
                            {
                                <a title="@item.TenSanPham" style="height: 35px;display: inline-block;" href="/SanPham/ThongTinSanPham/@item.LoaiSanPham.SubLoaiSanPham?loaisanpham=@item.LoaiSanPham.TenLoaiSanPham&phanloai=@item.LoaiSanPham.LoaiSanPhamID&sanpham=@item.TenSanPham&id=@item.SanPhamID"> @item.TenSanPham</a>
                            }
                            else
                            {
                                <a title="@item.TenSanPham" style="height: 35px;display: inline-block;" href="/SanPham/ThongTinSanPham/@item.LoaiSanPham.SubLoaiSanPham?loaisanpham=@item.LoaiSanPham.TenLoaiSanPham&phanloai=@item.LoaiSanPham.LoaiSanPhamID&sanpham=@item.TenSanPham&id=@item.SanPhamID"> @item.TenSanPham.Substring(0,30)...</a>
                            }
                        }
		            <br>		          					          	
                    <strong>@item.Gia<span>đ</span></strong>
		        </div>
            </div>
        }
            </div>
    }

    @if(ViewBag.lienquan !=null)
    {
        <h3 style="font-weight: bold;">Sản phẩm liên quan</h3>
        <div class="wrapper" style="margin-bottom:10px">
        @foreach (var item in (List<SanPham>)ViewBag.lienquan)
        {
            <div class="products product_item" style="margin-left:10px;height:300px;">
                <div class="inner-product-home">
                    <a href="/SanPham/ThongTinSanPham?sanpham=@item.TenSanPham&id=@item.SanPhamID">
                        <img width="171" height="214" class="lazy img-product" src="@item.HinhAnh" alt="" data-original="@item.HinhAnh" style="display: block; "></a> 
                </div> 
                <div class="infor-text-pro">                    
                        @{
                            if(item.TenSanPham.Count() <=30)
                            {
                                <a title="@item.TenSanPham" style="height: 35px;display: inline-block;" href="/SanPham/ThongTinSanPham/@item.LoaiSanPham.SubLoaiSanPham?loaisanpham=@item.LoaiSanPham.TenLoaiSanPham&phanloai=@item.LoaiSanPham.LoaiSanPhamID&sanpham=@item.TenSanPham&id=@item.SanPhamID"> @item.TenSanPham</a>
                            }
                            else
                            {
                                <a title="@item.TenSanPham" style="height: 35px;display: inline-block;" href="/SanPham/ThongTinSanPham/@item.LoaiSanPham.SubLoaiSanPham?loaisanpham=@item.LoaiSanPham.TenLoaiSanPham&phanloai=@item.LoaiSanPham.LoaiSanPhamID&sanpham=@item.TenSanPham&id=@item.SanPhamID"> @item.TenSanPham.Substring(0,30)...</a>
                            }
                        }
		            <br>		          					          	
                    <strong>@item.Gia<span>đ</span></strong>
		        </div>
            </div>
        }
            </div>
    }
</div>
    }
}

